﻿@model IEnumerable<Kooboo.CMS.Content.Models.TextContent>
@{
    var top5 = Model.GroupBy(it => new
 {
     Restaurant = it["Restaurant"].ToString().Trim(),
     Food = it["Food"].ToString().Trim(),
     FoodUUID = it["FoodUUID"].ToString()
 }).Select(g => new Kooboo.CMS.FoodOrdering.Areas.FoodOrdering.Models.TopSeller
 {
     Restaurant = g.Key.Restaurant,
     Food = g.Key.Food,
     FoodUUID = g.Key.FoodUUID,
     Count = g.Count()
 }).OrderByDescending(o => o.Count).Take(5);
 }
<div class="block">
    <h4 class="title">@ViewBag.Title</h4>
    <ul class="list">
        @foreach (dynamic item in top5)
        {
            <li><a href="#" class="btnOrder" data-uuid="@item.FoodUUID">[@item.Restaurant] @item.Food
            </a></li>
        }
    </ul>
</div>
